export type KeyboardEventInit = {
	key: string;
	location?: number;
	code?: string;
	isComposing?: boolean;
	ctrlKey?: boolean;
	shiftKey?: boolean;
	altKey?: boolean;
	metaKey?: boolean;
};

export function sendKeyboardEvent(el: HTMLElement, eventType: string, detail: KeyboardEventInit) {
	const e = new KeyboardEvent(eventType, detail);
	(Array.isArray(el) ? el[0] : el).dispatchEvent(e);
}

export * from '../components/defineElement';
